Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commitment erd #47

Closed
wants to merge 6 commits into from
Closed

Commitment erd #47

wants to merge 6 commits into from

Conversation

TangoYankee
Copy link
Member

sql/commitment-funding.sql is the code under review

Create a database service in the action
Create a local dockerfile for runner
Connect to zoning-api network
sql/commitment.sql Outdated Show resolved Hide resolved
sql/commitment.sql Outdated Show resolved Hide resolved
@TangoYankee
Copy link
Member Author

TangoYankee commented Apr 26, 2024

@TylerMatteo commit f513c4a44751497b48a6926a3047da2b1ead9ec9 has geospatial data.

The steps to interact with data:
Preamble: update your .env with the sample.env variables

  1. Spin up the zoning api docker compose from the data-flow branch
    • This is necessary because it creates a data share network that data-flow depends on
  2. Spin up the data flow docker compose
    • be sure to build because the dockerfile now install gdal
  3. Download the four sources and place them in the project root
    • commitments source csv
    • projects source csv
    • projects points shp
    • projects polygon shp
  4. Copy the csv files into the db container
    • docker compose cp cpdb_planned_commitments_23adopt.csv db:var/lib/postgresql/data
    • docker compose cp cpdb_projects_23adopt.csv db:var/lib/postgresql/data
  5. Copy the shp files into the runner container
    • docker compose cp cpdb_projects_poly_23adopt runner:.
    • docker compose cp cpdb_projects_pts_23adopt runner:.
  6. Load the shp files into their tables
    • UPDATE: Before running this step, run the postgis EXTENSION sql from the sql/commitments.sql file in pgadmin. Otherwise, the spatial data will be errant.
    • start a terminal session in the runner container docker compose exec -it runner bash
    • from the terminal session, run each command in the bash/import-project.sh file (I didn't actually make it a bash script. So, copy and paste to the terminal is required)
  7. Run the sql/commitments.sql file in pgadmin

@bmarchena
Copy link

Do this!
ogr2ogr -nln city_council_districts_source Pg:"dbname=$BUILD_ENGINE_DB host=$BUILD_ENGINE_HOST user=$BUILD_ENGINE_USER port=$BUILD_ENGINE_PORT" nycc_24b -lco precision=NO -lco GEOMETRY_NAME=geom -nlt PROMOTE_TO_MULTI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants